import request from '@/utils/request'

export function setMaintenance(data) {
  return request({
    url: '/system/maintenance',
    method: 'post',
    data
  })
}

export function getMaintenance(query) {
  return request({
    url: '/system/getMaintenance',
    method: 'get',
    params: query
  })
}

export function updateMaintenance(data) {
  return request({
    url: '/system/updateMaintenance',
    method: 'post',
    data
  })
}

export function deleteMaintenance(data) {
  return request({
    url: '/system/deleteMaintenance',
    method: 'post',
    data
  })
}

export function addMaintenance(data) {
  return request({
    url: '/system/addMaintenance',
    method: 'post',
    data
  })
}

export function fetchArticle(id) {
  return request({
    url: '/vue-element-admin/article/detail',
    method: 'get',
    params: { id }
  })
}

export function fetchPv(pv) {
  return request({
    url: '/vue-element-admin/article/pv',
    method: 'get',
    params: { pv }
  })
}

export function createArticle(data) {
  return request({
    url: '/vue-element-admin/article/create',
    method: 'post',
    data
  })
}

